
const state = {
    menuIndex: '1'
}

const getters = {
    menuIndex: state => state.menuIndex
}

const actions = {
    getMenuIndex({commit}){
        setTimeout(()=>{
            commit('setMenuIndex', '1');
        },1000)
    }
}

const mutations = {
    setMenuIndex(state, menuIndex) {
        state.menuIndex = menuIndex;
    }
}

export default {
    state,
    getters, 
    actions,
    mutations
}